package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `json:"username"`
	Password string `json:"password"`
}

type UserRole struct {
	gorm.Model
	Uid int `json:"uid"`
	Rid int `json:"rid"`
}

type Role struct {
	gorm.Model
	Name string `json:"name"`
}

type RoleNode struct {
	gorm.Model
	Rid int `json:"rid"`
	Nid int `json:"nid"`
}

type Node struct {
	gorm.Model
	Name string `json:"name"`
}

type Car struct {
	gorm.Model
	Code string `json:"code"`
	Name string `json:"name"`
	Num  string `json:"num"`
}

type Order struct {
	gorm.Model
	OrderNo     string `json:"order_no"`
	FormAddress string `json:"form_address"`
	ToAddress   string `json:"to_address"`
	Cid         int    `json:"cid"`
}

type OrderList struct {
	OrderNo     string `json:"order_no"`
	FormAddress string `json:"form_address"`
	ToAddress   string `json:"to_address"`
	Code        string `json:"code"`
	Name        string `json:"name"`
	Num         string `json:"num"`
}
